home *** CD-ROM | disk | FTP | other *** search
- Path: zetnet.co.uk!demon!mjeff.demon.co.uk
- From: mick@mjeff.demon.co.uk (mick)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: More linked list nonsense
- Date: Wed, 24 Jan 1996 20:22:08 GMT
- Message-ID: <715.6597T1199T1745@mjeff.demon.co.uk>
- References: <4e5nih$iib@news.sdd.hp.com>
- NNTP-Posting-Host: mjeff.demon.co.uk
- X-NNTP-Posting-Host: mjeff.demon.co.uk
- X-Newsreader: THOR 2.22 (Amiga;TCP/IP) *UNREGISTERED*
-
-
- On 24-Jan-96 21:42:57 Jeff Grimmett wrote
- >Howdy,
-
- >It just occurred to me last night, as I pored over steaming code, that
- >the function Remove() (used to remove nodes from linked lists) might
- >POSSIBLY not be freeing the memory allocated to the node it is removing.
- >Does anyone have some insight on this?
-
- All Remove() does is remove (unlink) the node from the list, it's not
- supposed to free the memory. If you allocated the memory for the nodes
- then you are supposed to free it, (after Remove()'ing the node from the list
- first, of course).
-
- >It's difficult to deallocate a node once it's not part of the list, but
- >it's pretty STUPID to free it >BEFORE. :-)
-
- Why is it difficult to deallocate a node?
-
-
- Mick.
-
-